class MyArray <T,K> {
    T t;
    K k;
    public MyArray(T t,K k) {
        this.t = t;
        this.k = k;
    }

    public void change() {
        T tmp = t;
        t = (T)k;
        k = (K)tmp;
    }

    @Override
    public String toString() {
        return "MyArray{" +
                "t=" + t +
                ", k=" + k +
                '}';
    }
}
public class Test_2 {
    public static void main(String[] args) {
        MyArray<Integer,Double> m = new MyArray<>(10,9.9);
        m.change();
        System.out.println(m.toString());
    }
}
